package com.yuan.spring.redis.common;

import java.lang.annotation.*;

/**
 * my redisConfig
 * Created by 袁恩光 on 2017/5/22.
 */
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface RedisCache {

    /**
     * redis key
     */
    String value() default "";

    /**
     * 存储方式
     */
    CacheType cacheType() default CacheType.HASH;

    /**
     * 过期时间
     */
    int expire() default 0;

    enum CacheType {
        HASH,
        VALUE
    }

}
